if(RUNTIME_ENVIRONMENT STREQUAL "ascend")
    add_subdirectory(ascend)
elseif(RUNTIME_ENVIRONMENT STREQUAL "musa")
    add_subdirectory(musa)
elseif(RUNTIME_ENVIRONMENT STREQUAL "maca")
    add_subdirectory(maca)
elseif(RUNTIME_ENVIRONMENT STREQUAL "cuda")
    add_subdirectory(cuda)
elseif(RUNTIME_ENVIRONMENT STREQUAL "simu")
    add_subdirectory(simu)
else()
    message(FATAL_ERROR "RUNTIME_ENVIRONMENT must be one of: ascend, musa, cuda, simu. Current value: ${RUNTIME_ENVIRONMENT}")
endif()

if(TARGET storedevice)
    target_include_directories(storedevice PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
else()
    message(FATAL_ERROR "storedevice target was not created. Check RUNTIME_ENVIRONMENT setting and subdirectory CMakeLists.txt files.")
endif()
